package com.liuwa.social.weixin.push;

import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;




/**
 * 小程序订阅消息
 * @author Rubekid
 *
 * 2017年3月31日 下午8:26:15
 */
public class SubscribeMessage {

	


	 /**
    * 消息线程线程池大小
    */
   public static final int MESSAGE_POOL_SIZE = 10;
   
   /**
    * 线程池
    */
   private static ThreadPoolExecutor threadPool = (ThreadPoolExecutor) Executors.newFixedThreadPool(MESSAGE_POOL_SIZE);
	

	/**
	 * 发送消息
	 * @param template
	 * @param appId
	 * @param appSecret
	 */
	public static void send(SubscribeTemplate template, String appId, String appSecret){
		threadPool.execute(new SubscribeTask(appId, appSecret, template));
	}
}
